<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html" />
<body class="fixed hold-transition skin-blue">
	<div class="wrapper">
		<!-- Main Header -->
		<div th:replace="tophtml::html"></div>
		<!-- Left side column. contains the logo and sidebar -->
		<div th:replace="left::html"></div>

		<!-- Content Wrapper. Contains page content -->
		<div class="content-wrapper">
			<!-- Content Header (Page header) -->
			<section class="content-header">
				
					 <input type="hidden" id="customerId" th:value="${customer.pid}" /> 
						
						<input id="customerInfo" type="hidden" th:value="'&customerId='+${customer.pid}+'&customerNumber='+${customer.customerNumber}+'&customerName='+${customer.customerName}">
						
						<small></small>
				

				<div class="audit_k">
					客户详细信息&nbsp;&nbsp;&nbsp;<!--  <a
						href="javascript:void(0);selectAnchor('anchor1');"
						onclick="document.getElementById('anchor1').scrollIntoView()">联系人信息</a>&nbsp;&nbsp;&nbsp; -->
					<a href="javascript:void(0);selectAnchor('anchor2');"
						onclick="document.getElementById('anchor2').scrollIntoView()">客户需求已匹配信息</a>&nbsp;&nbsp;&nbsp;
					<a href="javascript:void(0);selectAnchor('anchor3');"
						onclick="document.getElementById('anchor3').scrollIntoView()">客户需求未匹配信息</a>&nbsp;&nbsp;&nbsp;
					<a href="javascript:void(0);selectAnchor('anchor4');"
						onclick="document.getElementById('anchor4').scrollIntoView()">客户已经推送的项目</a>&nbsp;&nbsp;&nbsp;
				</div>
				<ol class="breadcrumb">
					<li><a th:href="@{/index}"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a th:href="@{/customer/customerList}"><i
							class="fa fa-dashboard"></i>客户管理</a></li>
					<li><a href="">客户详情</a></li>
				</ol>
			</section>

			<!-- Main content -->
			<section class="content container-fluid">
				<table class="table table-bordered" th:object="${project}"
					id="details">
					<tr>
						<td>客户名称：</td>
						<td th:text="${customer.customerName}">xxxxx</td>
						<td>客户性质：</td>
						<td th:text="${customer.customerNatureName}">xxxxx</td>
					</tr>
					<tr>
						<td>客户来源：</td>
						<td th:text="${customer.customerSourceName}">xxxxx</td>
						<td>客户类型：</td>
						<td th:text="${customer.customerTypeName}">xxxxx</td>
					</tr>
					<tr>
						<td>所属领域：</td>
						<td th:text="${customer.researchFieldNameStr}">xxxxx</td>
						<td>主营业务：</td>
						<td th:text="${customer.mainBusiness}">xxxxx</td>
					</tr>
					
					<tr>
						<td>主要需求：</td>
						<td th:text="${customer.majorNeeds}">xxxxx</td>
						<td>合作状态：</td>
						<td th:text="${customer.currentStateName}">xxxxx</td>
					</tr>
					<tr>
						<td>国内国外：</td>
						<td th:text="${customer.domesticOrForeign == 0 ? '国内' : '国外'}">xxxxx</td>
						<td>地区：</td>
						<td th:text="${customer.areaNameStr}">xxxxx</td>
					</tr>
					<!--  
					<tr>
						<td>备注1：</td>
						<td th:text="${customer.remark1}">xxxxx</td>
						<td>备注2：</td>
						<td th:text="${customer.remark2}">xxxxx</td>
					</tr>-->
					<tr>
						<td>意向合作方式1：</td>
						<td th:text="${customer.intentionCooperate2Name}">xxxxx</td>
						<td>意向合作方式2：</td>
						<td th:text="${customer.intentionCooperateName}">xxxxx</td>
					</tr>
					
					<tr>
						<td>收集人(录入人)：</td>
						<td th:text="${user.fullName}"></td>
						<td>录入时间：</td>
						<td th:text="${customer.entryTime}"></td>
					</tr>
					
					<tr>
						<td>最新进展：</td>
						<td th:title="${customer.evolve}" th:text="${not #strings.isEmpty(customer.evolve)} and ${#strings.length(customer.evolve)} > 8 ? ${#strings.substring(customer.evolve, 0, 8)}+'...' : ${customer.evolve}"></td>
						<td>历史合作情况：</td>
						<td th:title="${customer.historywork}" th:text="${not #strings.isEmpty(customer.historywork)} and ${#strings.length(customer.historywork)} > 8 ? ${#strings.substring(customer.historywork, 0, 8)}+'...' : ${customer.historywork}"></td>
					</tr>
					
					<!-- <tr>
						<td>收集人(录入人)：</td>
						<td colspan="3" th:text="${user.fullName}"></td>
						<td>录入时间：</td>
						<td th:text="${customer.entryTime}"></td>
					</tr> -->
					
				</table>
				
				<div th:if="${person==null}">
				<span style="text-align: center;display:block;font-weight:bold;">暂无联系人<a type="button" id="otherPersonContent"></a></span>
				</div>
				
				
				<div th:if="${person}">
				<!-- <span style="text-align: center;display:block;font-weight:bold;">联系人信息<a type="button" id="otherPersonContent"></a></span> -->
					<div class="menuContent2">
						<table  class="table table-bordered">
						<tr>
						<td style="text-align: center;font-size: 16px;" colspan="12">
							<b>客户联系人</b>
							<b><a th:with="url=@{/customer/showDetail(customerId=${customer.pid},lookExpert=1,expertId=${person.pid})}" th:href="'javascript:lookExpert(\''+${url}+'\')'">查看联系方式</a></b>
							<input id="lookExpertPwd" type="text" placeholder="输入密码后查看">
						</td>
						</tr>
	                    <tr th:with="isShow=${isLook}==1 and ${isSign}==0">
							<td><label>姓名：</label></td>
							<td th:text="${person.name}" ></td>
							<td><label>手机：</label></td>
							<td th:with="len=${#strings.isEmpty(person.tell)} ? 0 : ${#strings.length(person.tell)}/2" th:text="${not isShow} and ${len}>2 ? ${#strings.replace(person.tell, #strings.substring(person.tell, len-2, len+2), '****')} : ${person.tell}"></td>
							<td><label>邮箱：</label></td>
							<td th:text="${not isShow} and ${not #strings.isEmpty(person.email)} and ${#strings.length(person.email)}>4 ? ${#strings.replace(person.email, #strings.substring(person.email, 0, 4), '****')} : ${person.email}"></td>
							<td><label>微信：</label></td>
							<td th:text="${not isShow} and ${not #strings.isEmpty(person.wechat)} and ${#strings.length(person.wechat)}>3 ? ${#strings.replace(person.wechat, #strings.substring(person.wechat, 0, 3), '***')} : ${person.wechat}"></td>
							<td><label>固定电话：</label></td>
							<td th:with="len=${#strings.isEmpty(person.fixedPhone)} ? 0 : ${#strings.length(person.fixedPhone)}/2" th:text="${not isShow} and ${len}>2 ? ${#strings.replace(person.fixedPhone, #strings.substring(person.fixedPhone, len-2, len+2), '****')} : ${person.fixedPhone}"></td>
							<td><label>其他联系方式：</label></td>
							<td th:text="${not isShow} and ${not #strings.isEmpty(person.otherContact)} and ${#strings.length(person.otherContact)}>3 ? ${#strings.replace(person.otherContact, #strings.substring(person.otherContact, 0, 3), '***')} : ${person.otherContact}"></td>
						</tr>
						
						<tr class="row1" style="display: none;">
							<td>最高学历：</td>
							<td th:text="*{maxEducation}"></td>
							<td>毕业院校及所学专业：</td>
							<td th:text="*{schoolAndMajor}"></td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>单位：</td>
							<td th:text="*{unit}"></td>
							<td>职务(职称)：</td>
							<td th:text="*{title}"></td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>籍贯：</td>
							<td th:text="*{birthPlace}"></td>
							<td>教育背景：</td>
							<td th:text="*{not #strings.isEmpty(education)} and *{#strings.length(education)} > 20 ? *{#strings.substring(education, 0, 20)}+'...' : *{education}" 
                       			th:title="*{education}">
                       		</td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>工作经历：</td>
							<td th:text="*{not #strings.isEmpty(workExp)} and *{#strings.length(workExp)} > 20 ? *{#strings.substring(workExp, 0, 20)}+'...' : *{workExp}" 
                       			th:title="*{workExp}">
                       		</td>
							<td>荣誉奖励：</td>
							<td th:text="*{not #strings.isEmpty(honorAward)} and *{#strings.length(honorAward)} > 20 ? *{#strings.substring(honorAward, 0, 20)}+'...' : *{honorAward}" 
                       			th:title="*{honorAward}">
                       		</td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>科技成果：</td>
							<td th:text="*{not #strings.isEmpty(technica)} and *{#strings.length(technica)} > 20 ? *{#strings.substring(technica, 0, 20)}+'...' : *{technica}" 
                       			th:title="*{technica}">
                       		</td>
							<td>专家类型：</td>
							<td th:text="*{typeWorth}"></td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>国内国外：</td>
							<td th:text="*{domesticOrForeign == 0 ? '国内' : '国外'}"></td>
							<td>专家来源：</td>
							<td th:text="*{sourceWorth}"></td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>所在地区：</td>
							<td th:text="*{areaWorth}"></td>
							<td>人才级别：</td>
							<td th:text="*{not #strings.isEmpty(talentLevel)} and *{#strings.length(talentLevel)} > 20 ? *{#strings.substring(talentLevel, 0, 20)}+'...' : *{talentLevel}" 
                       			th:title="*{talentLevel}">
                       		</td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>附件：</td>
							<td >
           						<a th:if="${annex}" th:href="@{'/person/downloadPerson?fileName='+${annex}}">专家附件</a>
           					</td>
           					<td>性别：</td>
           					<td th:text="${sex == null ? '' : sex == 0 ? '男' : '女'}">男</td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>出生日期：</td>
							<td th:text="*{birth}"></td>
							<td>录入时间：</td>
							<td th:text="*{entryTime}"></td>
						</tr>
						<tr class="row1" style="display: none;">
							<td>备注1：</td>
							<td th:text="*{not #strings.isEmpty(remark1)} and *{#strings.length(remark1)} > 20 ? *{#strings.substring(remark1, 0, 20)}+'...' : *{remark1}" 
                       			th:title="*{remark1}">
                       		</td>
							<td>备注2：</td>
							<td th:text="*{not #strings.isEmpty(remark2)} and *{#strings.length(remark2)} > 20 ? *{#strings.substring(remark2, 0, 20)}+'...' : *{remark2}" 
                       			th:title="*{remark2}">
                       		</td>
						</tr>
						
						
						<tr>
						<!-- 显示/隐藏专家部分信息 -->
						<!-- <td colspan="4" style="text-align: center;"><input type="button" id="more" value="更多信息"/></td> -->
						</tr>
							</tbody>
						</table>
					</div>
				</div>
				
			</section>


		
		 <section class="content container-fluid">
			
				<div class="menuTitle2">
					<span><a id="anchor2" style="color:black;font-size: 14px; font-weight: bolder;">客户已经对接的需求</a> </span>
					
				</div>
				<div class="menuContent2">
					<div class="outside_t" style="margin: 10px 0 0 0;"></div>
					<div>
						<div class="nav-tabs-custom">
							<ul class="nav nav-tabs">
								<li class="active">
									<a href="#tab_1" data-toggle="tab" aria-expanded="true">
										<font style="vertical-align: inherit;">客户已对接需求</font>
									</a>
								</li>
								<!-- <li class="">
									<a href="#tab_2" data-toggle="tab" aria-expanded="false">
										<font style="vertical-align: inherit;">对接项目详情</font>
									</a>
								</li> -->
							</ul>
							<div class="tab-content">
								<div class="tab-pane active" id="tab_1">
									<table id="compareDemand" class="table table-bordered">
										<thead>
											<tr>
												<th>需求id</th>
												<th>需求名称</th>
			                                    <th>需求类型</th>
			                                    <th>需求状态</th>
			                                    <th>需求联系人</th>
											    <th>操作</th>
											</tr>
										</thead>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				<div class="menuTitle2">
					<span><a id="anchor3" style="color:black;font-size: 14px; font-weight: bolder;">客户未对接的需求</a> </span>
				</div>
				<div class="menuContent2">
					<div class="outside_t" style="margin: 10px 0 0 0;"></div>
					<div>
						<div class="nav-tabs-custom">
							<ul class="nav nav-tabs">
								<li class="active">
									<a href="#tab_3" data-toggle="tab" aria-expanded="true">
										<font style="vertical-align: inherit;">客户未对接需求</font>
									</a>
								</li>
								<!-- <li class="">
									<a href="#tab_4" data-toggle="tab" aria-expanded="false">
										<font style="vertical-align: inherit;">未匹配项目详情</font>
									</a>
								</li> -->
								<!-- <li><button id="matching" class="btn btn-primary">匹配</button></li> -->
							</ul>
							<div class="tab-content">
								<div class="tab-pane active" id="tab_3">
									<table id="notCompareDemand" class="table table-bordered">
										<thead>
											<tr>
												<th>需求id</th>
												<th>需求名称</th>
			                                    <th>需求类型</th>
			                                    <th>需求状态</th>
			                                    <th>需求联系人</th>
											    <th>操作</th>
											</tr>
										</thead>
									</table>
								</div>
								 <!-- <div class="tab-pane" id="tab_4">
									<table id="notCompareProject" class="table table-bordered" style="width: 100%">
										<thead>
											<tr>
											<th><input id="all" type="checkbox"></th>
												 <th>项目id</th>
				                                  <th>项目名称</th>
				                                  <th>项目类型</th>
				                                  <th>项目状态</th>
				                                  <th>联系人</th>
											</tr>
										</thead>
									</table>
								</div>  -->
							</div>
						</div>
					</div>
				</div>
				
				
				
				<div class="menuTitle2">
					<span><a id="anchor4" style="color:black;font-size: 14px; font-weight: bolder;">客户已经推送的项目</a> </span>
				</div>
				<div class="menuContent2">
					<div class="outside_t" style="margin: 10px 0 0 0;"></div>
					<div>
						<div class="nav-tabs-custom">
							<ul class="nav nav-tabs">
								<li class="active">
									<a href="#tab_4" data-toggle="tab" aria-expanded="true">
										<font style="vertical-align: inherit;">客户已经推送的项目</font>
									</a>
								</li>
							</ul>
							<div class="tab-content">
								<div class="tab-pane active" id="tab_4">
									<table id="compareProject" class="table table-bordered">
										<thead>
											<tr>
												<th>项目id</th>
												<th>项目名称</th>
			                                    <th>项目类型</th>
			                                    <th>项目状态</th>
			                                    <th>项目联系人</th>
											</tr>
										</thead>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
				
				<a href="#0" class="cd-top cd-is-visible">Top</a>
				<div class="box-footer">
					<a class="btn btn-primary" th:href="@{/customer/customerDemandList(pid=${customer.pid})}">需求列表</a>
					<a th:if="${customer.customerContact==null}" class="btn btn-primary" th:href="@{/customer/addCustomerContact(pid=${customer.pid})}">添加联系人</a>
					
					<a th:if="${customer.customerContact!=null}" class="btn btn-primary" th:href="@{'/customer/updateView?pid='+${customer.customerContact}+'&customerId='+${customer.pid}+'&origType=222'}">修改联系人</a>
					
					<a class="btn btn-primary" th:href="@{/customer/queryCustomerConference(customerId=${customer.pid})}">参会</a>
					<a class="btn btn-primary" th:href="@{/customer/updateCustomer(pid=${customer.pid})}">修改</a>
					<a class="btn btn-primary" href="javascirpt:void(0)" th:onclick="'javascript:subscribe(\''+${customer.pid}+'\',3)'">关注</a>
					<button type="button" class="btn btn-primary" onclick="window.history.go(-1)" >返回</button>
	          </div>
				
			</section>
			
			
			
	</div>
	<!-- /.row (main row) -->

	<div></div>
	
	
	</div>

	<!-- Main Footer -->
	<div th:replace="footer::html"></div>
	<div class="control-sidebar-bg"></div>
	</div>
	<div th:replace="bottom::html"></div>
	<link rel="stylesheet"
		href="/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
	<script
		src="/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
	<script
		src="/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
		<script src="/js/formValid.js"></script>

	<script type="text/javascript"  th:inline="javascript">
		var pid = $("#customerId").val();
		/* matchButt([[@{/customer/pipei}]]); */
		$(document)
				.ready(
						function() {
							$('#compareDemand')
									.DataTable(
											{
												"ajax" : {
													"url" : "/customer/ajaxmateDemandView",
													"data" : {
														'pid' : pid
													},
													"dataSrc" : ""
												},
												"language" : {
													"lengthMenu" : "每页显示 _MENU_ 条记录",
													"zeroRecords" : "没有记录",
													"info" : "当前第 _PAGE_页   总共 _PAGES_页",
													"infoEmpty" : "没有查询到记录",
													"infoFiltered" : "(从 _MAX_ 条记录里筛选)"
												},
												"columns" : [ {
													"data" : "demandNumberStr"
												},{
													"data" : "demandName"
												}, {
													"data" : "demandType"
												}, {
													"data" : "demandStatusWorth"
												}, {
													"data" : "demandContactName"
												} ],
												"columnDefs" : [
																// 增加一列，包括删除和修改，同时将我们需要传递的数据传递到链接中
																{
																	"targets" : [ 5 ], // 目标列位置，下标从0开始
																	"render" : function(data, type, row, meta) {
																		return "<a href='/project/showDemandMatchedProject?pid="
																		+ row.pid+"&customerId="+row.customerId+"'>匹配</a>";
																	}
																},{
																	"targets" : [ 0 ], // 目标列位置，下标从0开始
																	"data" : "demandNumberStr", // 数据列名
																	"render" : function(data, type, row, meta) { // 返回自定义内容
																		  return "<a href='/demand/showDetail?demandId="
																			+ row.pid
																			+ "'>"+data+"</a>";
																	}
																},{
																	"targets" : [ 1 ], // 目标列位置，下标从0开始
																	"data" : "demandName", // 数据列名
																	"render" : function(data, type, row, meta) { // 返回自定义内容
																		 if (data.length > 12) {
																			  return "<span title="+data+">"+ data.substr(0, 11)+"...</span>";
															                } else {
															                	 return "<span>"+data+"</span>";
															                }		
																	}
																},{
																	"targets" : [ 4], // 目标列位置，下标从0开始
																	"data" : "demandContactName", // 数据列名
																		"render" : function(data, type, row, meta) {
																			if (data == "null" || data==null) {
																				return "";
																			} else {
																				return "<a href=/person/personDetails?pid="+row.demandContactId+">"+data+"</a>";
																			}
																	}}]
											});
							
							
							
							
							 $('#compareProject')
							.DataTable(
									{
										"ajax" : {
											"url" : "/customer/ajaxmateProjectView",
											"data" : {
												'pid' : pid
											},
											"dataSrc" : ""
										},
										"language" : {
											"lengthMenu" : "每页显示 _MENU_ 条记录",
											"zeroRecords" : "没有记录",
											"info" : "当前第 _PAGE_页   总共 _PAGES_页",
											"infoEmpty" : "没有查询到记录",
											"infoFiltered" : "(从 _MAX_ 条记录里筛选)"
										},
										"columnDefs" : [
														// 增加一列，包括删除和修改，同时将我们需要传递的数据传递到链接中
														{
															"targets" : [0], // 目标列位置，下标从0开始
															"render" : function(data, type, row, meta) {
																return "<a href='/project/showDetail?projectId="
																+ row.projectNumber+"'>"+row.projectNum+"</a>";
															}
														}],
										"columns" : [ {
											"data" : "projectNum"
										}, {
											"data" : "projectName"
										}, {
											"data" : "projectType"
										}, {
											"data" : "buttStatusStr"
										}, {
											"data" : "buttName"
										} ]
									}); 
							
							
							
							$('#notCompareDemand')
							.DataTable(
									{
										"ajax" : {
											"url" : "/customer/ajaxnotCompareDemand",
											"data" : {
												'pid' : pid
											},
											"dataSrc" : ""
										},
										"language" : {
											"lengthMenu" : "每页显示 _MENU_ 条记录",
											"zeroRecords" : "没有记录",
											"info" : "当前第 _PAGE_页   总共 _PAGES_页",
											"infoEmpty" : "没有查询到记录",
											"infoFiltered" : "(从 _MAX_ 条记录里筛选)"
										},
										"columns" : [ {
											"data" : "demandNumberStr"
										},{
											"data" : "demandName"
										}, {
											"data" : "demandType"
										}, {
											"data" : "demandStatusWorth"
										}, {
											"data" : "demandContactName"
										} ],
										"columnDefs" : [
														// 增加一列，包括删除和修改，同时将我们需要传递的数据传递到链接中
														{
															"targets" : [ 5 ], // 目标列位置，下标从0开始
															"render" : function(data, type, row, meta) {
																return "<a href='/project/showDemandMatchedProject?pid="
																+ row.pid+"&customerId="+row.customerId+"'>匹配</a>";
															}
														},{
															"targets" : [ 0 ], // 目标列位置，下标从0开始
															"data" : "demandNumberStr", // 数据列名
															"render" : function(data, type, row, meta) { // 返回自定义内容
																  return "<a href='/demand/showDetail?demandId="
																	+ row.pid
																	+ "'>"+data+"</a>";
															}
														},{
															"targets" : [ 1 ], // 目标列位置，下标从0开始
															"data" : "demandName", // 数据列名
															"render" : function(data, type, row, meta) { // 返回自定义内容
																 if (data.length > 12) {
																	  return "<span title="+data+">"+ data.substr(0, 11)+"...</span>";
													                } else {
													                	 return "<span>"+data+"</span>";
													                }		
															}
														},{
															"targets" : [ 4], // 目标列位置，下标从0开始
															"data" : "demandContactName", // 数据列名
																"render" : function(data, type, row, meta) {
																	if (data == "null" || data==null) {
																		return "";
																	} else {
																		return "<a href=/person/personDetails?pid="+row.demandContactId+">"+data+"</a>";
																	}
															}}]
									});
							
							
							$('#customerContact').DataTable( {
						        "ajax": {
						        	"url" : "/customer/ajaxCustomerContact",
						            "dataSrc": "",
						            "data" : {
										'pid' : pid
									}
						        },
						        "language": {
						        	"lengthMenu": "每页显示 _MENU_ 条记录",
						            "zeroRecords": "没有记录",
						            "info": "当前第 _PAGE_页   总共 _PAGES_页",
						            "infoEmpty": "没有查询到记录",
						            "infoFiltered": "(从 _MAX_ 条记录里筛选)"
						        },
						        "columns" : [ {
									"data" : "name"
								}, {
									"data" : "tell"
								},{
									"data" : "email"
								},{
									"data" : "wechat"
								},{
									"data" : "fixedPhone"
								},{
									"data" : "otherContact"
								} ],
								"columnDefs" : [
													// 增加一列，包括删除和修改，同时将我们需要传递的数据传递到链接中
													{
														"targets" : [ 0 ], // 目标列位置，下标从0开始
														"data" : "name", // 数据列名
														"render" : function(data, type, row, meta) {
																// 返回自定义内容
																/* return "E"+data; */
															return "<a href='/person/personDetails?pid="+ row.pid+ "'>"+data+"</a>";
														}
													} ]
						    } );
							 
							
							
							
							/*  $('#notCompareDemand')
							.DataTable(
									{
										"ajax" : {
											"url" : "/customer/ajaxnotCompareDemand",
											"data" : {
												'pid' : pid
											},
											"dataSrc" : ""
										},
										"language" : {
											"lengthMenu" : "每页显示 _MENU_ 条记录",
											"zeroRecords" : "没有记录",
											"info" : "当前第 _PAGE_页   总共 _PAGES_页",
											"infoEmpty" : "没有查询到记录",
											"infoFiltered" : "(从 _MAX_ 条记录里筛选)"
										},
										"columns" : [{
											"data" : "demandId"
										}, {
											"data" : "demandNumber"
										},{
											"data" : "demandName"
										}, {
											"data" : "demandType"
										}, {
											"data" : "demandStatus"
										}, {
											"data" : "demandContactName"
										} ],
										"columnDefs" : [
														// 增加一列，包括删除和修改，同时将我们需要传递的数据传递到链接中
														{
															"targets" : [ 0 ], // 目标列位置，下标从0开始
															"data" : "demandId", // 数据列名
																"render" : function(data, type, row, meta) {
																	var demandInfo = "demandId="+data+"&demandNumber="+row.demandNumber.replace("D", "")+"&demandName="+row.demandName;
																	var buttInfo = demandInfo + $("input#customerInfo").val();
																	
																	var tr = $("#"+row.demandNumber).closest("tr");
																	$(tr).addClass("butt-gray");
																	if (data !== null && data != undefined) {
																		return "<input type='checkbox' class='matched' value="+buttInfo+">";
																	} else {
																		$("#all").prop("disabled", true);
																		return "<input id='"+row.demandNumber+"' disabled type='checkbox' class='matched' value="+buttInfo+">";
																	}
																}},
														{
															"targets" : [ 1 ], // 目标列位置，下标从0开始
															"data" : "demandNumber", // 数据列名
															"render" : function(data, type, row, meta) { // 返回自定义内容
																  return "<a href='/demand/showDetail?demandId="
																	+ row.demandId
																	+ "'>"+data+"</a>";
															}
														},
														{
															"targets" : [ 2 ], // 目标列位置，下标从0开始
															"data" : "demandName", // 数据列名
															"render" : function(data, type, row, meta) { // 返回自定义内容
																 if (data.length > 12) {
																	  return "<span title="+data+">"+ data.substr(0, 11)+"...</span>";
													                } else {
													                	 return "<span>"+data+"</span>";
													                }		
															}
														},
														{
															"targets" : [ 5], // 目标列位置，下标从0开始
															"data" : "demandContactName", // 数据列名
																"render" : function(data, type, row, meta) {
																	if (data == "null") {
																		return "";
																	} else {
																		return data;
																	}
															}},
														]
									});  */
							
							
							/* $('#notCompareProject')
							.DataTable(
									{
										"ajax" : {
											"url" : "/customer/ajaxnotCompareProject",
											"data" : {
												'pid' : pid
											},
											"dataSrc" : ""
										},
										"language" : {
											"lengthMenu" : "每页显示 _MENU_ 条记录",
											"zeroRecords" : "没有记录",
											"info" : "当前第 _PAGE_页   总共 _PAGES_页",
											"infoEmpty" : "没有查询到记录",
											"infoFiltered" : "(从 _MAX_ 条记录里筛选)"
										},
										"columns" : [{
											"data" : "projectId"
										}, {
											"data" : "projectNumber"
										},{
											"data" : "projectName"
										}, {
											"data" : "projectType"
										}, {
											"data" : "projectStatus"
										}, {
											"data" : "projectContactName",
										} ]  ,
										"columnDefs" : [
														// 增加一列，包括删除和修改，同时将我们需要传递的数据传递到链接中
														{
															"targets" : [ 0], // 目标列位置，下标从0开始
															"data" : "projectId", // 数据列名
																"render" : function(data, type, row, meta) {
																	var projectInfo = "projectId="+data+"&projectNumber="+row.projectNumber.replace("R", "")+"&projectName="+row.projectName;
																	var buttInfo = projectInfo + $("input#customerInfo").val();
																	
																	var tr = $("#"+row.projectNumber).closest("tr");
																	$(tr).addClass("butt-gray");
																	if (data !== null && data != undefined) {
																		return "<input type='checkbox' class='matched' value="+buttInfo+">";
																	} else {
																		$("#all").prop("disabled", true);
																		return "<input id='"+row.projectNumber+"' disabled type='checkbox' class='matched' value="+buttInfo+">";
																	}
																}},
																{
																	"targets" : [ 5], // 目标列位置，下标从0开始
																	"data" : "projectContactName", // 数据列名
																		"render" : function(data, type, row, meta) {
																			if (data == "null") {
																				return "";
																			} else {
																				return data;
																			}
																	}},
																{
																	"targets" : [ 1 ], // 目标列位置，下标从0开始
																	"data" : "projectNumber", // 数据列名
																	"render" : function(data, type, row, meta) { // 返回自定义内容
																		  return "<a href='/project/showDetail?projectId="
																			+ row.projectId
																			+ "'>"+data+"</a>";
																	}
																},
																{
																	"targets" : [ 2 ], // 目标列位置，下标从0开始
																	"data" : "projectName", // 数据列名
																	"render" : function(data, type, row, meta) { // 返回自定义内容
																		 if (data.length > 12) {
																			  return "<span title="+data+">"+ data.substr(0, 11)+"...</span>";
															                } else {
															                	 return "<span>"+data+"</span>";
															                }		
																	}
																}]  
									}); */
						});
		$("#matching").click(function() {
			var href = $(this).closest("ul").find("li.active a").attr("href");
			if (href === "#tab_3")
				matching([[@{/customer/pipei}]]);
			else if (href === "#tab_4")
				matching([[@{/customer/pipeiProject}]]);
		});
		
		//隐藏和显示专家部分信息
		$(document).on('click', '#more', function () {
			var row = $("tr[class='row1']");  
            for(i = 0; i < row.length; i++){ 
				if(row[i].style.display == 'none'){
					row[i].style.display = ''; 	
				}else{
					row[i].style.display = 'none';
				}
			} 
		})
	</script>
</body>

</html>